namespace HD.Model
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;

    public class Task
    {
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }
        [Required(ErrorMessageResourceName = "TaskNameRequiredMessage", ErrorMessageResourceType = typeof(Resource))]
        [MaxLength(50, ErrorMessageResourceName = "TaskNameMaxMessage", ErrorMessageResourceType = typeof(Resource))]
        public string Name { get; set; }
        [Required(ErrorMessageResourceName = "TaskDecriptionRequiredMessage", ErrorMessageResourceType = typeof(Resource))]
        [MaxLength(50, ErrorMessageResourceName = "TaskDescriptionMaxMessage", ErrorMessageResourceType = typeof(Resource))]
        public string Decription { get; set; }

        public int DefaultValue { get; set; }

        public virtual ICollection<TaskCompleted> TaskCompleteds { get; set; }
        public virtual ICollection<TaskInitiation> TaskInitiation { get; set; }
    }
}
